package whu.o2o.util;

import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.os.Handler;
import android.widget.ImageView;

import whu.o2o.R;



public class RecordUtil {
	private Context mContext;
	private Dialog mDialog;
	private ImageView mImageView;

	public RecordUtil(Context context) {
		mContext = context;
	}

	public void recordStart() {
		mDialog = new Dialog(mContext, R.style.dialog);
		mImageView = new ImageView(mContext);
		//mImageView.setImageResource(R.anim.start_record);

		new Handler().postDelayed(new Runnable() {

			@Override
			public void run() {
				AnimationDrawable animationDrawable = (AnimationDrawable) mImageView.getDrawable();
				animationDrawable.start();
			}
		}, 10);

		mDialog.setContentView(mImageView);
		mDialog.show();

		// initializeAudio();
	}
}
